import UserType from "./userType";
import Permission from "./permission";

let SideBarItem = {};

SideBarItem.items = [
  {
    icon: "el-icon-fa fa-bar-chart",
    index: "/student",
    title: "学生首页",
    userType: UserType.student,
    permission: Permission.no
  },
  {
    icon: "el-icon-fa fa-book",
    index: "/student/course/select",
    title: "选修课程",
    userType: UserType.student,
    permission: Permission.no
  },
  {
    icon: "el-icon-fa fa-edit",
    index: "/student/course",
    title: "学生课程",
    userType: UserType.student,
    permission: Permission.no
  },
  {
    icon: "el-icon-fa fa-table",
    index: "/student/timetable",
    title: "课表查询",
    userType: UserType.student,
    permission: Permission.no
  },
  {
    icon: "el-icon-fa fa-newspaper-o",
    index: "/student/score",
    title: "成绩查询",
    userType: UserType.student,
    permission: Permission.no
  },
  {
    icon: "el-icon-fa fa-id-badge",
    index: "/student/info",
    title: "信息维护",
    userType: UserType.student,
    permission: Permission.no
  },
  {
    icon: "el-icon-fa fa-bar-chart",
    index: "/teacher",
    title: "教师首页",
    userType: UserType.teacher,
    permission: Permission.no
  },
  {
    icon: "el-icon-fa fa-book",
    index: "/teacher/course",
    title: "授课查询",
    userType: UserType.teacher,
    permission: Permission.no
  },
  {
    icon: "el-icon-fa fa-table",
    index: "/teacher/timetable",
    title: "教师课表",
    userType: UserType.teacher,
    permission: Permission.no
  },
  {
    icon: "el-icon-fa fa-edit",
    index: "/teacher/grade",
    title: "成绩录入",
    userType: UserType.teacher,
    permission: Permission.no
  },


  // 管理员页面集合
  {
    icon: "el-icon-fa fa-bar-chart",
    index: "/admin",
    title: "管理员首页",
    userType: UserType.admin,
    permission: Permission.no
  },
  {
    icon: "el-icon-fa fa-fort-awesome",
    index: "/workshop",
    title: "车间信息管理",
    userType: UserType.admin,
    permission: Permission.department, 
    subs:[
    {
      icon: "el-icon-s-order",
      index:"/workshop/workpiece",
      title: "工件信息"
    },
    {
      icon: "el-icon-s-operation",
      index:"/workshop/machine",
      title: "机器管理"
    }
  ]
  },
  {
    // 
    icon: "el-icon-fa fa-graduation-cap",
    index: "/admin/major",
    title: "生产任务排产",
    userType: UserType.admin,
    permission: Permission.major,
    subs:[
      {
        icon: "el-icon-circle-plus",
        index:"/scheduling/addOrder",
        title: "新增订单"
      },
      {
        icon: "el-icon-s-claim",
        index:"/admin/teacher",
        title: "历史订单"
      },
      {
        icon: "el-icon-s-data",
        index:"/admin/student",
        title: "调度结果"
      }
    ]
  },
  {
    icon: "el-icon-setting",
    index: "/system",
    title: "系统管理",
    userType: UserType.admin,
    permission: Permission.class,
    subs:[
      {
        icon: "el-icon-s-opportunity",
        index:"/system/users",
        title: "用户信息管理"
      },
      {
        icon: "el-icon-s-check",
        index:"/admin/teacher",
        title: "系统权限管理"
      },
      {
        icon: "el-icon-s-flag",
        index:"/admin/student",
        title: "调度算法管理"
      }
    ]
  },
  {
    icon: "el-icon-fa fa-user", 
    index: "/personalCenter",
    title: "个人中心",
    userType: UserType.admin,
    permission: Permission.admin
  },



  // 以下内容暂时不用
  // {
  //   icon: "el-icon-fa fa-id-badge",
  //   index: "/admin/student",
  //   title: "学生管理",
  //   userType: UserType.admin,
  //   permission: Permission.student
  // },
  // {
  //   icon: "el-icon-fa fa-user-plus",
  //   index: "/admin/teacher",
  //   title: "教师管理",
  //   userType: UserType.admin,
  //   permission: Permission.teacher
  // },
  // {
  //   icon: "el-icon-fa fa-book",
  //   index: "/admin/course",
  //   title: "课程管理",
  //   userType: UserType.admin,
  //   permission: Permission.course
  // },
  // {
  //   icon: "el-icon-fa fa-edit",
  //   index: "/admin/student/course",
  //   title: "选课修改",
  //   userType: UserType.admin,
  //   permission: Permission.studentCourse
  // }

];

export default SideBarItem;
